package com.yuyu.entity;

import lombok.Data;

import java.util.Date;
import java.util.List;
import java.util.Objects;

@Data
public class User {


    private Integer id;

    private String name;

    private Integer age;

    private Date datetime;//交易时间

    private List<JiaoYi> dates;//交易数据

    private Integer zhid;//账户id

    private String types;//类型

    public User() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Date getDatetime() {
        return datetime;
    }

    public void setDatetime(Date datetime) {
        this.datetime = datetime;
    }

    public List<JiaoYi> getDates() {
        return dates;
    }

    public void setDates(List<JiaoYi> dates) {
        this.dates = dates;
    }

    public Integer getZhid() {
        return zhid;
    }

    public void setZhid(Integer zhid) {
        this.zhid = zhid;
    }

    public String getTypes() {
        return types;
    }

    public void setTypes(String types) {
        this.types = types;
    }

    public User(Integer id, String name, Integer age, Date datetime, List<JiaoYi> dates, Integer zhid, String types) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.datetime = datetime;
        this.dates = dates;
        this.zhid = zhid;
        this.types = types;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return Objects.equals(id, user.id) &&
                Objects.equals(name, user.name) &&
                Objects.equals(age, user.age) &&
                Objects.equals(datetime, user.datetime) &&
                Objects.equals(dates, user.dates) &&
                Objects.equals(zhid, user.zhid) &&
                Objects.equals(types, user.types);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, age, datetime, dates, zhid, types);
    }
}
